package com.lilong.jwt.common.exception;

import lombok.Getter;
import org.springframework.http.HttpStatus;

@Getter

public enum ExceptionEnum {
    SUCCESS(HttpStatus.OK.value(),HttpStatus.OK.name()),
    NOT_FOUND(HttpStatus.NOT_FOUND.value(),"没有找到"),
    OBJECT_IS_NULL(600,"对象不能为空！"),
    TOKEN_FAILED(601,"Token生成失败！"),
    DELETE(602,"已删除！"),
    ALREADY_EXIST(606,"已存在"),
    NOT_EXIST(607,"不存在"),
    OBJECT_PARAM(608,"对象参数错误"),
    OBJECT_ID_IS_NULL(609,"对象ID不能为空！"),
    OBJECT_OTHER_EXIST(610,"");


    ExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;

    }

    private Integer code;
    private String msg;

}
